package cn.wolfcode.service.Impl;

import cn.wolfcode.domain.File;
import cn.wolfcode.mapper.FileMapper;
import cn.wolfcode.service.IFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import java.util.List;

@Service("IFileService")
@Scope("prototype")
public class FileServiceImpl implements IFileService {
    @Autowired
    private FileMapper fileMapper;

    @Override
    public void insert(File file) {
        fileMapper.insert(file);
    }

    @Override
    public List<File> selectuid(long uid) {
        List<File> selectuid = fileMapper.selectuid(uid);
        return selectuid;
    }

    @Override
    public File selectid(long id) {
        File selectid = fileMapper.selectid(id);
        return selectid;
    }

    @Override
    public void update(File file) {
        fileMapper.update(file);
    }

    @Override
    public void delete(long id) {
        fileMapper.delete(id);
    }
}
